Frames No Frames Cognitoware API v2009512
Cognitoware.Robotics.dll
Cognitoware.Robotics.StateEstimation

Class ParticleFilter<X, U, Z>
X: The type of x being tracked.
U: The type of action applied to the x.
Z: The type of x about the x.

System.Object
Cognitoware.Robotics.StateEstimation.ParticleFilter<X, U, Z>

Implemented Interfaces

Cognitoware.Robotics.StateEstimation.BayesFilter<X>

Summary

A Bayes filter that operates on Particle distributions.

Constructor Summary

ParticleFilter()

Method Summary

BayesianInference(SensorModel<Z>, Z, ParticleDistribution<X>)
Updates a belief with a sensor model and a sensor.
Equals(Object)
Inherited from System.Object
Finalize()
Inherited from System.Object
GetHashCode()
Inherited from System.Object
GetImportanceWeight(Int32)
Gets the cumulative importance weight for a particle after an observation update.
GetType()
Inherited from System.Object
LowVarianceSampling(ParticleDistribution<X>, Double[])
Divides the cumulative importance weights into ResampleCount partitions. The prior particle at each border of the partition is added to the posterior.
Marginalize(ActionModel<U>, RandomDistribution<U>, ParticleDistribution<X>)
Updates a belief with an action model and a distribution of possible actions.
Marginalize(ActionModel<U>, U, ParticleDistribution<X>)
Updates a belief with an action model and an action.
MemberwiseClone()
Inherited from System.Object
MonteCarloResampling(ParticleDistribution<X>, Double[])
Randomly samples particles from the prior using the importance weights.
Oversample(ActionModel<U>, U, ParticleDistribution<X>)
Generates one additional particle using action update in the filter belief.
Resample(ParticleDistribution<X>, Double[])
Samples the belief using importance weights.
ToString()
Inherited from System.Object
UpdateBeliefWithAction(U)
Updates the x with the specified action.
UpdateBeliefWithObservation(Z)
Update the x with the specified observation.
UpdateImportanceWeights(SensorModel<Z>, Z, ParticleDistribution<X>, )
Generates importance weights for particles in the belief distribution.

Constructor Details

public ParticleFilter()

Method Details

public ParticleDistribution<X> BayesianInference(SensorModel<Z> model, Z observation, ParticleDistribution<X> state)
Updates a belief with a sensor model and a sensor. This function allows you to update a belief that is different than the filter belief with a sensor model that is different than the filter sensor model. The number of samples specified by the filter are used.

Parameters:

model - The sensor model to use for the belief update.
observation - The observation to use for the belief update.
x - The belief to update.

Returns:

The posterior belief after applying the action to the prior belief.

public Double GetImportanceWeight(Int32 index)
Gets the cumulative importance weight for a particle after an observation update. The cumulative importance weight is the sum of probabilities of making the specific observation from the particle x for all particles before the specified particle. Each index corresponds to a specific particle in the belied that is prior to the observation update. All weights are removed after an action update.

Parameters:

index - The index of the particle

public ParticleDistribution<X> LowVarianceSampling(ParticleDistribution<X> belief, Double[] weightCDF)
Divides the cumulative importance weights into ResampleCount partitions. The prior particle at each border of the partition is added to the posterior. ResampleCount is used to determine the number of particles in the new distribution.

Parameters:

belief - The belief on which to perform resampling.
weightCDF - The cumulative importance weights.

Returns:

The resampled particle distribution.

public ParticleDistribution<X> Marginalize(ActionModel<U> model, RandomDistribution<U> action, ParticleDistribution<X> state)
Updates a belief with an action model and an distribution of possible actions. This function allows you to update a belief that is different than the filter belief with an action model that is different than the filter action model. The number of samples specified by the filter are used.

Parameters:

model - The action model to use for the belief update.
action - The distribution of actions to use for the belief update.
x - The belief to update.

Returns:

The posterior belief after applying the action to the prior belief.

public ParticleDistribution<X> Marginalize(ActionModel<U> model, U action, ParticleDistribution<X> state)
Updates a belief with an action model and an action. This function allows you to update a belief that is different than the filter belief with an action model that is different than the filter action model. The number of samples specified by the filter are used.

Parameters:

model - The action model to use for the belief update.
action - The action to use for the belief update.
x - The belief to update.

Returns:

The posterior belief after applying the action to the prior belief.

public ParticleDistribution<X> MonteCarloResampling(ParticleDistribution<X> belief, Double[] weightCDF)
Randomly samples particles from the prior using the importance weights. ResampleCount is used to determine the number of particles in the new distribution.

Parameters:

belief - The belief on which to perform resampling.
weightCDF - The cumulative importance weights.

Returns:

The resampled particle distribution.

public void Oversample(ActionModel<U> model, U action, ParticleDistribution<X> prior)
Generates one additional particle using action update in the filter belief. If this is expected to be used, the belief before the action update should be saved so that it can be passed into this function.

Parameters:

model - The action model to use to update the belief.
action - The action to use to update the belief.
prior - The previous belief that is sampled to generate the new belief particle.

public virtual ParticleDistribution<X> Resample(ParticleDistribution<X> belief, Double[] weightCDF)
Samples the belief using importance weights. The combination of particle density and importance weights effectively multiplies the prior distrubion with the sensor model likelihood. There are several methods that can be used for resampling. This method is virtual to allow the user to change the resampling method. By default, low variance sampling is used.

Parameters:

belief - The belief on which to perform resampling.
weightCDF - The cumulative importance weights.

Returns:

The resampled particle distribution.

public virtual void UpdateBeliefWithAction(U action)
Updates the x with the specified action.

Parameters:

action - The action used to update the x belief.

public virtual void UpdateBeliefWithObservation(Z observation)
Update the x with the specified observation.

Parameters:

observation - The observation used to update the x belief.

public void UpdateImportanceWeights(SensorModel<Z> model, Z observation, ParticleDistribution<X> state, weightCDF)
Generates importance weights for particles in the belief distribution.

Parameters:

model - The sensor model used as the function to generate weights.
observation - The observation passed into the sensor model.
x - The set of particles passed into the sensor model.
weightCDF - An array reference that will hold the importance weights.


Questions, Comments and Licensing
Copyright 2009 Cognitoware. All rights reserved.